projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c2769a
)
babl: fix bug in icc tag alignment
author
Øyvind Kolås
<pippin@gimp.org>
Mon, 9 Jul 2018 14:29:42 +0000
(16:29 +0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Mon, 9 Jul 2018 14:29:46 +0000
(16:29 +0200)
babl/babl-icc.c
patch
|
blob
|
history
diff --git
a/babl/babl-icc.c
b/babl/babl-icc.c
index ed6e0ccb87b920d73fbed0efe86a82a49e83859f..9d520b976fce9e16cfacdbc8d03e338dc0b3ff23 100644
(file)
--- a/
babl/babl-icc.c
+++ b/
babl/babl-icc.c
@@
-392,7
+392,10
@@
static const Babl *babl_trc_from_icc (ICC *state, int offset,
static void icc_allocate_tag (ICC *state, const char *tag, int size)
{
- state->no+=((4-state->o)%4);state->o = state->no;state->psize = size;
+ while (state->no % 4 != 0)
+ state->no++;
+
+ state->o = state->no;state->psize = size;
icc_write (sign, 128 + 4 + 4 * state->headpos++, tag);
icc_write (u32, 128 + 4 + 4 * state->headpos++, state->o);
icc_write (u32, 128 + 4 + 4 * state->headpos++, size);